import type { EditorThemeClasses } from 'lexical';

const theme: EditorThemeClasses = {
  code: 'pre hljs',
  codeHighlight: {
    addition: 'hljs-addition',
    atrule: 'hljs-meta',
    attr: 'hljs-attr',
    attribute: 'hljs-attribute',
    boolean: 'hljs-literal',
    built_in: 'hljs-built_in',
    bullet: 'hljs-bullet',
    cdata: 'hljs-meta',
    char: 'hljs-char.escape_',
    class: 'hljs-title.class_',
    'class-name': 'hljs-title.class_',
    comment: 'hljs-comment',
    constant: 'hljs-literal',
    deleted: 'hljs-deletion',
    deletion: 'hljs-deletion',
    doctype: 'hljs-meta',
    emphasis: 'hljs-emphasis',
    entity: 'hljs-meta',
    function: 'hljs-title.function_',
    important: 'hljs-keyword',
    inserted: 'hljs-addition',
    keyword: 'hljs-keyword',
    literal: 'hljs-literal',
    meta: 'hljs-meta',
    namespace: 'hljs-meta',
    number: 'hljs-number',
    operator: 'hljs-operator',
    prolog: 'hljs-meta',
    property: 'hljs-attribute',
    punctuation: 'hljs-punctuation',
    quote: 'hljs-quote',
    regex: 'hljs-regexp',
    regexp: 'hljs-regexp',
    section: 'hljs-section',
    selector: 'hljs-selector-tag',
    selectorAttr: 'hljs-selector-attr',
    selectorClass: 'hljs-selector-class',
    selectorId: 'hljs-selector-id',
    selectorPseudo: 'hljs-selector-pseudo',
    selectorTag: 'hljs-selector-tag',
    string: 'hljs-string',
    strong: 'hljs-strong',
    symbol: 'hljs-symbol',
    tag: 'hljs-selector-tag',
    title: 'hljs-title',
    type: 'hljs-type',
    url: 'hljs-link',
    variable: 'hljs-variable',
  },
  heading: {
    h1: 'h1',
    h2: 'h2',
    h3: 'h3',
    h4: 'h4',
    h5: 'h5',
    h6: 'h6',
  },
  paragraph: 'p mb-0',
  table: 'table',
  tableCell: 'table-cell',
  tableRow: 'table-row',
  tableScrollableWrapper: 'table-responsive',
  text: {
    bold: 'fw-bold',
    italic: 'fst-italic',
    strikethrough: 'text-decoration-line-through',
    underline: 'text-decoration-underline',
  },
};

export default theme;
